<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
    <div>
	   <ul>
	     <li id="li1"></li>
		 <li></li>
	   </ul>
	</div>
 </body>
 <script>
 //firstChild  lastChild previousSibling nextSiling
    var p1 = document.getElementById("li1");
	 
     var p2 = p1.parentNode;
	 var p3 = p2.parentNode;
	 var p4 = p3.parentNode;
	 var p5 = p4.parentNode;
	 var arr = [p1,p2,p3,p4,p5];
	 alert(arr);
	 for(var i=0;i < arr.length;i++){
	   alert(arr[i].nodeName);
	 }
	 p1.innerHTML = "<div>12213213</div>";
	 p1.innerText = "<div>123123123</div>";
	 document.write("<div>2312312313</div>");
 </script>
</html>
